import request from '@/utils/request'

// 查询房屋照片列表
export function listHousePhoto(query) {
  return request({
    url: '/house/photo/list',
    method: 'get',
    params: query
  })
}

// 上传房屋照片
export function uploadHousePhoto(data) {
  return request({
    url: '/house/photo/upload',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 删除房屋照片
export function delHousePhoto(photoId) {
  return request({
    url: '/house/photo/' + photoId,
    method: 'delete'
  })
}

// 获取照片URL
export function getPhotoUrl(photoId) {
  return request({
    url: '/house/photo/url/' + photoId,
    method: 'get'
  })
} 